home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2006 February / Gamestar_81_2006-02_dvd.iso / Red Shark / Common / CountryShop.script < prev    next >
Text File  |  2001-12-21  |  1KB  |  59 lines

  1. //-------------------------------------------------------------------
  2. //
  3. //  This code is copyright 2001 by G5 Software.
  4. //  Any unauthorized usage, either in part or in whole of this code
  5. //  is strictly prohibited. Violators WILL be prosecuted to the
  6. //  maximum extent allowed by law.
  7. //
  8. //-------------------------------------------------------------------
  9.  
  10. class CCountryShopMesh_1
  11. {
  12.   string MeshFile = "Models/B_Country_Shop_1.mesh";
  13.   string SkinFile = "Models/B_Country_Shop_1.skin";
  14. }
  15.  
  16. class CCountryShopMesh_2
  17. {
  18.   string MeshFile = "Models/B_Country_Shop_2.mesh";
  19.   string SkinFile = "Models/B_Country_Shop_2.skin";
  20. }
  21.  
  22. class CCountryShopStateControl extends CUnitLifeControl
  23. {
  24.   void CCountryShopStateControl()
  25.   {
  26.     CUnitLifeControl(3500.0);
  27.     m_DestroyPause = 20.0;
  28.     m_ExplosionId  = "EXPLID_BuildingExplosion";
  29.   }
  30. }
  31.  
  32. // Building without ground control (for use in villages)
  33. class CBaseCountryShop extends CBuilding, CUnitWithStateControl
  34. {
  35.   array m_MeshClassNames = array(
  36.       "CCountryShopMesh_1",
  37.       "CCountryShopMesh_2"
  38.     );
  39.  
  40.   void CBaseCountryShop()
  41.   {
  42.     int MeshNumber = rand_int(m_MeshClassNames.size());
  43.     InitializeModelAsStatic(m_MeshClassNames[MeshNumber]);
  44.     CUnitWithStateControl("CCountryShopStateControl");
  45.   }
  46. }
  47.  
  48. // Single game object
  49. class CMountedCountryShop extends CBaseCountryShop
  50. {
  51.   void CMountedCountryShop()
  52.   {
  53.     InitializeGroundControl();
  54.   }
  55. }
  56.  
  57.  
  58.  
  59.